<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.vsg.stock.core.domain.mybatis.StockDailyKLineProxy">


	<resultMap id="StockDailyKLineResult" type="org.vsg.stock.core.domain.mybatis.StockDailyKLineProxy">
		<id property="id.stockCode" column="STOCK_CODE" />
		<id property="id.date" column="STOCK_DATE" />
		<result property="open" column="OPEN"/>
		<result property="high" column="HIGH"/>
		<result property="low" column="LOW"/>
		<result property="close" column="CLOSE"/>
		<result property="yieldRate" column="YIELD_RATE"/>
		<result property="vol" column="VOL"/>
		<result property="transactionValue" column="TRANSACTION_VALUE"/>
		<result property="exRights" column="EX_RIGHTS"/>
	</resultMap>


	<select id="findStockLineByAll" parameterType="String" resultMap="StockDailyKLineResult">
    	select STOCK_CODE , STOCK_DATE , OPEN,
    		HIGH, LOW, CLOSE , YIELD_RATE , VOL , TRANSACTION_VALUE , 
    		EX_RIGHTS
    		from kline_daily WHERE STOCK_CODE = #{stockCode}
  	</select>	

	<select id="findStockLineByCycle_byDate" parameterType="map" resultMap="StockDailyKLineResult">
    	select STOCK_CODE , STOCK_DATE , OPEN,
    		HIGH, LOW, CLOSE , YIELD_RATE , VOL , TRANSACTION_VALUE , 
    		EX_RIGHTS
    		from kline_daily WHERE STOCK_CODE = #{stockCode} 
    			and STOCK_DATE &gt;= #{startDate} and STOCK_DATE &lt;= #{endDate}
  	</select>	


</mapper>
